home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr49
/
medit_.zip
/
MDEMO.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1993-04-07
|
3KB
|
54 lines
#include <dos.h>
#include <conio.h>
void setmousecursor(int hotspotx, int hotspoty, void far *mbufp);
void mouse(int ax, int bx, int cx, int dx);
extern int Max, Mbx, Mcx, Mdx; // global variables
void main()
{
// this type definition neccessary for medit mouses
typedef union
{
struct {unsigned char Cursor_mask[32],Screen_mask[32];} m;
unsigned char Mouse_mask[64];
} MOUSE;
// the following code produced by MEDIT! //
MOUSE pressakey = {0x24, 0x33, 0x6D, 0x55, 0x24, 0x33, 0x76, 0x75, 0x24, 0x75, 0xFF, 0xFF, 0xFF, 0xFE, 0x7F, 0xFD, 0x3F, 0xF8, 0xBF, 0xFB, 0xFF, 0xFF, 0x75, 0x69, 0xAD, 0x5B, 0xDD, 0x39, 0xDF, 0x5B, 0xDD, 0x69,
0xDB, 0xCC, 0x92, 0xAA, 0xDB, 0xCC, 0x89, 0x8A, 0xDB, 0x8A, 0x0, 0x0, 0x0, 0x1, 0x80, 0x2, 0xC0, 0x7, 0x40, 0x4, 0x0, 0x0, 0x8A, 0x96, 0x52, 0xA4, 0x22, 0xC6, 0x20, 0xA4, 0x22, 0x96};
MOUSE upl = {0xFF, 0x7F, 0xFF, 0xBF, 0xFF, 0xDF, 0xFF, 0xEF, 0xFF, 0xF7, 0xFF, 0xFB, 0xFF, 0xFD, 0xFF, 0xFE, 0x7F, 0xFF, 0xBF, 0xFF, 0xDF, 0xFF, 0xEF, 0xFF, 0xF7, 0xFF, 0xFB, 0xFF, 0xFD, 0xFF, 0xFE, 0xFF,
0x0, 0x80, 0x0, 0x40, 0x0, 0x20, 0x0, 0x10, 0x0, 0x8, 0x0, 0x4, 0x0, 0x2, 0x0, 0x1, 0x80, 0x0, 0x40, 0x0, 0x20, 0x0, 0x10, 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, 0x0, 0x0, 0x0, 0x0, 0xFF, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0};
// The preceding code produced by MEDIT! //
_AH=0; _AL=0x13; geninterrupt(0x10); // set 320x200 256 color graphics mode
mouse(0,0,0,0); // initialize the mouse
mouse(1,0,0,0); // display the mouse
setmousecursor(0,0,&pressakey);
while(!kbhit()){}
getch();
while(!kbhit()){ // animate the mouse cursor by flipping thru them.
setmousecursor(0,0,&upl);
delay(75);
setmousecursor(0,0,&upd);
delay(75);
setmousecursor(0,0,&upr);
delay(75);
setmousecursor(0,0,&lr);
delay(75);}
_AH=0; _AL=0x03; geninterrupt(0x10); // go back to text mode
}